package com.da.mp.beans;

import com.baomidou.mybatisplus.annotations.*;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;

//@KeySequence(value="seq_user",clazz=Integer.class)
@TableName("tbl_user")
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    //@TableId(value = "id", type = IdType.INPUT)
    private Integer id;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String name;

    @TableField(fill = FieldFill.INSERT)
    @TableLogic  //逻辑删除属性
    private Integer logicFlag;

    public User(Integer id, String name, Integer logicFlag) {
        this.id = id;
        this.name = name;
        this.logicFlag = logicFlag;
    }

    public User() {

    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLogicFlag() {
        return logicFlag;
    }

    public void setLogicFlag(Integer logicFlag) {
        this.logicFlag = logicFlag;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", logicFlag=" + logicFlag +
                '}';
    }
}
